<?php
    $GLOBALS['user'] = $user;
    function user_change($field){
        $user = $GLOBALS['user'];
        ?>
        <a class="pull-right" href="<?php echo DOMAIN;?>user/change/<?php echo $field;?>" title="<?php if($user[$field.'_status']==1) echo lang('click_to_show'); else echo lang('click_to_hide');?>">
            <?php if($user[$field.'_status']==1){?>Ẩn<?php }else{?>Hiện<?php };?>
        </a>
        <?php
    }
?>
<div class="row-fluid bg-post-blog profile_float_right">
    <div class="span6 box-content-post-blog">
        <h3 class="tieude-blog"><?php echo lang('thongtincoban');?></h3>
        <div class="clear-main"></div>
        <div class="row-fluid">
            <ol style="padding-left: 20px;">
                <?php if((isset($user_login)&&$user_login['id'] == $user['id']) || $user['fullname_status']){?><li>Tên: <?php echo $user['fullname'];?>
                    <?php user_change('fullname');?></li><?php }?>
                <?php if((isset($user_login)&&$user_login['id'] == $user['id']) || $user['birth_date_status']){?><li>Ngày sinh: <?php echo $user['birth_date'];?>
                    <?php user_change('birth_date');?></li><?php }?>
                <?php if((isset($user_login)&&$user_login['id'] == $user['id']) || $user['nghanhnghe_status']){?><li>Ngànhn ghề: <?php echo $user['nghanhnghe'];?>
                    <?php user_change('nghanhnghe');?></li><?php }?>
                <?php if((isset($user_login)&&$user_login['id'] == $user['id']) || $user['created_status']){?><li>Ngày tham gia: <?php echo date('d/m/Y',strtotime($user['created']));?>
                    <?php user_change('created');?></li><?php }?>
            </ol>
        </div>
    </div>
    <div class="span6 box-content-post-blog">
        <h3 class="tieude-blog"><?php echo lang('thongtinlienhe');?></h3>
        <div class="clear-main"></div>
        <div class="row-fluid">
            <ol style="padding-left: 20px;">
                <?php if((isset($user_login)&&$user_login['id'] == $user['id']) || $user['phone_status']){?><li>Số điện thoại: <?php echo $user['phone'];?>
                    <?php user_change('phone');?></li><?php }?>
                <?php if((isset($user_login)&&$user_login['id'] == $user['id']) || $user['email_status']){?><li>Email: <?php echo $user['email'];?>
                    <?php user_change('email');?></li><?php }?>
                <?php if((isset($user_login)&&$user_login['id'] == $user['id']) || $user['address_status']){?><li>Địa chỉ: <?php echo $user['address'];?>
                    <?php user_change('address');?></li><?php }?>
                <?php if((isset($user_login)&&$user_login['id'] == $user['id']) || $user['website_status']){?><li>Website: <?php echo $user['website'];?>
                    <?php user_change('website');?></li><?php }?>
            </ol>
        </div>
    </div>
</div>